cmake_minimum_required(VERSION 3.20)

project(sys_call_cost)

# 设置 C++ 标准
set(CMAKE_CXX_STANDARD 23)
#启用 gnu 扩展
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS ON)

#设置全局编译器选项
add_compile_options(-std=gnu++23)

#使用通用 CXX Flags，还有 CMAKE_CXX_FLAGS_DEBUG、CMAKE_DXX_FLAGS_RELEASE、CMAKE_CXX_FLAGS_MINSIZEREL、
# CMAKE_CXX_FLAGS_RELWITHDEBINFO。CMAKE_CXX_FLAGS 没有默认值。
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++23")

add_executable(sys_call_cost main.cpp)

install(TARGETS sys_call_cost RUNTIME DESTINATION bin)
